﻿package Message.Public
{
    import Framework.MQ.*;
    import Framework.Serialize.*;
    import flash.utils.*;

    public class SGuildDefenseInfo extends IMessageBase
    {
        public var blood:int;
        public var waves:int;
        public var surplusSeconds:int;
        public var bossNum:int;
        public var towers:Dictionary;
        public var myTowerPiece:int;
        public const _type:int = 5113;
        public static var _regist:SGuildDefenseInfo = new SGuildDefenseInfo(true);

        public function SGuildDefenseInfo(param1:Boolean = false)
        {
            if (param1)
            {
                MessageManager.instance().regist(this);
            }
            return;
        }// end function

        override public function getType() : int
        {
            return this._type;
        }// end function

        override public function clone() : IMessageBase
        {
            return new SGuildDefenseInfo();
        }// end function

        override public function __write(param1:SerializeStream) : void
        {
            param1.writeInt(this.blood);
            param1.writeInt(this.waves);
            param1.writeInt(this.surplusSeconds);
            param1.writeInt(this.bossNum);
            DictTypeSGuildTowerInfoHelper.write(param1, this.towers);
            param1.writeInt(this.myTowerPiece);
            return;
        }// end function

        override public function __read(param1:SerializeStream) : void
        {
            this.blood = param1.readInt();
            this.waves = param1.readInt();
            this.surplusSeconds = param1.readInt();
            this.bossNum = param1.readInt();
            this.towers = DictTypeSGuildTowerInfoHelper.read(param1);
            this.myTowerPiece = param1.readInt();
            return;
        }// end function

    }
}
